import java.util.Random;

public class Customer {
	
	int accountNumber;
	String name;
	private String surName;
	private String street;
	private String city;
	private String birthDate;
	private char[] password;
	Account account;
	
	Random rd = new Random();
	
	public Customer(){
		this.accountNumber = rd.nextInt(9999999-1000000-1) + 1000000 + 1;
		this.name = CreateAccount.name.getText();
		this.surName = CreateAccount.sureName.getText();
		this.street = CreateAccount.street.getText();
		this.city = CreateAccount.city.getText();
		this.birthDate = CreateAccount.birthDate.getText();
		this.password = CreateAccount.password.getPassword();
		this.account = new Account();
	}
	
	public String toString() {
		return "Imie: " + name + "\nNazwisko: " + surName + "\nNumer konta: " + accountNumber + "\nStan konta: " + account.getBalance() + "\n";
	}
	
	public int getNumber(){
		return accountNumber;
	}
	
	public String getPassword(){
		String logU = new String(password); 
		return logU;
	}

	public String getName() {
        return name;
	}

	public String getSurName() {
        return surName;
	}

	public String getStreet() {
        return street;
	}

	public String getCity() {
        return city;
	}

	public String getBirthDate() {
        return birthDate;
	}
}
